import java.util.Scanner;
public class Table {

	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int x;
		int y;
		int print;
		System.out.println("TYPE IN A NUMBER");
		x=input.nextInt();
		System.out.println("TYPE IN ANOTHER ONE");
		y=input.nextInt();
		int[][] table=new int[x+1][y+1];
		for(int i=1;i<x+1;i++){
			for(int j=1;j<y+1;j++){
				int prnt = i*j;
				table[i][j]=prnt;
				System.out.print(" "+table[i][j]+" ");
			}
			System.out.println();
		}
	}
}
